#pragma once

#if defined(UECC_DLL_API)
#else
#define UECC_DLL_API _declspec(dllimport)
#endif

#include <stdint.h>
#include <stdbool.h>

struct LibuECCBuffer32
{
	uint8_t buffer[32];
};

struct LibuECCBuffer64
{
	uint8_t buffer[64];
};

#define LIBUECC_SUCC		0
#define LIBUECC_ERR_UNKOWN	0xFF		

typedef struct LibuECCBuffer32 LibuECC_private_key_t;
typedef struct LibuECCBuffer64 LibuECC_public_key_t;
typedef struct LibuECCBuffer32 LibuECC_sha256_t;
typedef struct LibuECCBuffer64 LibuECC_signed_data_t;
typedef struct LibuECCBuffer32 LibuECC_shared_secret_t;

UECC_DLL_API int get_version();
UECC_DLL_API int LibuECC_generate_key_pair(LibuECC_private_key_t* p_private_key,
	LibuECC_public_key_t* p_public_key);
UECC_DLL_API int LibuECC_get_publickey(LibuECC_private_key_t const * const p_private_key,
	LibuECC_public_key_t* p_public_key);
UECC_DLL_API int LibuECC_get_shared_secret(LibuECC_private_key_t const * const p_private_key,
	LibuECC_public_key_t* p_public_key,
	LibuECC_shared_secret_t* p_shared_secret);
UECC_DLL_API int LibuECC_is_on_Curve(LibuECC_public_key_t* p_public_key);
UECC_DLL_API int LibuECC_Sign(LibuECC_private_key_t const * const p_private_key,
	LibuECC_sha256_t const * const p_sha256,
	LibuECC_signed_data_t* p_signed_data);
UECC_DLL_API int LibuECC_verify(LibuECC_public_key_t const * const p_public_key,
	LibuECC_sha256_t const * p_sha256,
	LibuECC_signed_data_t* p_signed_data,
	bool* p_isValid);
